/**
 * Heater(热水器)
 * @author MIAO
 * Created on 2011-10-10
 * For more information, please visit:ismiao.com
 */
package com.ismiao.designPattern.Observer.example2;

import java.util.Observable;

public class Heater extends Observable {
	int temperature;
	public int getTemperature(){
		return temperature;
	}
	
	public void setTemperature(int temperature){
		this.temperature = temperature;
	}
	public void boilWater(){
		for(int i = 90; i < 100; i++){
			temperature = i;
			setChanged();
			notifyObservers();
		}
	}
}
